using DeZhen.CollaborationPlatform.Model.Common;
using SqlSugar;

namespace DeZhen.CollaborationPlatform.Model.Entities
{
    /// <summary>
    /// 接口管理表
    /// </summary>
    [SugarTable(TableName = "api_management", TableDescription = "接口管理表")]
    public class ApiManagements : BaseEntity
    {
        /// <summary>
        /// 接口名称
        /// </summary>
        [SugarColumn(ColumnName = "api_name", ColumnDescription = "接口名称")]
        public string? ApiName { get; set; }

        /// <summary>
        /// 接口URL
        /// </summary>
        [SugarColumn(ColumnName = "api_url", ColumnDescription = "接口URL")]
        public string? ApiUrl { get; set; }

        /// <summary>
        /// 请求方法
        /// </summary>
        [SugarColumn(ColumnName = "api_method", ColumnDescription = "请求方法")]
        public string? ApiMethod { get; set; }

        /// <summary>
        /// 接口唯一标识
        /// </summary>
        [SugarColumn(ColumnName = "api_group", ColumnDescription = "接口分组/模块")]
        public string? ApiGroup { get; set; }

        /// <summary>
        /// 接口归属
        /// </summary>
        [SugarColumn(ColumnName = "api_owner", ColumnDescription = "接口归属")]
        public string? ApiOwner { get; set; }

        /// <summary>
        /// 接口描述
        /// </summary>
        [SugarColumn(ColumnName = "api_desc", ColumnDescription = "接口描述")]
        public string? ApiDesc { get; set; }

        /// <summary>
        /// 请求参数
        /// </summary>
        [SugarColumn(ColumnName = "request_params", ColumnDescription = "请求参数")]
        public string? RequestParams { get; set; }

        /// <summary>
        /// 请求示例
        /// </summary>
        [SugarColumn(ColumnName = "request_example", ColumnDescription = "请求示例")]
        public string? RequestExample { get; set; }

        /// <summary>
        /// 响应参数
        /// </summary>
        [SugarColumn(ColumnName = "response_params", ColumnDescription = "响应参数")]
        public string? ResponseParams { get; set; }

        /// <summary>
        /// 响应示例
        /// </summary>
        [SugarColumn(ColumnName = "response_example", ColumnDescription = "响应示例")]
        public string? ResponseExample { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "status", ColumnDescription = "状态")]
        public bool Status { get; set; } = true;

        /// <summary>
        /// 是否需要认证
        /// </summary>
        [SugarColumn(ColumnName = "auth_required", ColumnDescription = "是否需要认证")]
        public bool AuthRequired { get; set; } = true;

        /// <summary>
        /// 接口版本
        /// </summary>
        [SugarColumn(ColumnName = "version", ColumnDescription = "接口版本")]
        public string? Version { get; set; } = "1.0";

        /// <summary>
        /// 创建人编码
        /// </summary>
        [SugarColumn(ColumnName = "create_user_code", ColumnDescription = "创建人编码")]
        public string? CreateUserCode { get; set; }

        /// <summary>
        /// 创建人名称
        /// </summary>
        [SugarColumn(ColumnName = "create_user_name", ColumnDescription = "创建人")]
        public string? CreateUserName { get; set; }

        /// <summary>
        /// 更新人编码
        /// </summary>
        [SugarColumn(ColumnName = "update_user_code", ColumnDescription = "更新人编码")]
        public string? UpdateUserCode { get; set; }

        /// <summary>
        /// 更新人名称
        /// </summary>
        [SugarColumn(ColumnName = "update_user_name", ColumnDescription = "更新人")]
        public string? UpdateUserName { get; set; }
    }
} 